import request from '@/config/axios'

export interface ProcDsgnVO {
                    id: number
                    title: string
                    appDsgnId: number
                    resId: number
                    state: number
                    content: string
                    mode: number
                    version: number
                    createDept: number
                    status: number
                    remark: string
}

// 查询流程设计列表
export const getProcDsgnPage = async (params) => {
  return await request.get({ url: '/res/proc-dsgn/page', params })
}

// 查询流程设计详情
export const getProcDsgn = async (id: number) => {
  return await request.get({ url: '/res/proc-dsgn/get?id=' + id })
}

// 新增流程设计
export const createProcDsgn = async (data: ProcDsgnVO) => {
  return await request.post({ url: '/res/proc-dsgn/create', data })
}

// 修改流程设计
export const updateProcDsgn = async (data: ProcDsgnVO) => {
  return await request.put({ url: '/res/proc-dsgn/update', data })
}

// 删除流程设计
export const deleteProcDsgn = async (id: number) => {
  return await request.delete({ url: '/res/proc-dsgn/delete?id=' + id })
}

// 导出流程设计 Excel
export const exportProcDsgnApi = async (params) => {
  return await request.download({ url: '/res/proc-dsgn/export-excel', params })
}